package com.ms.oschina.fragment;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.ms.oschina.R;
import com.ms.oschina.base.BaseFragment;
import com.ms.oschina.bean.News;
import com.ms.oschina.util.UiUtils;

public class NewsDetailTitleFragment extends BaseFragment {
	private TextView tvDetailsTitle;
	private TextView tvDetailsPublishTime;
	private TextView tvDetailsAuthor;
	private View view;

	@Override
	public void onAttach(Activity activity) {
		super.onAttach(activity);
		view = UiUtils.inflate(R.layout.fragment_newsdetail_title);
		findViews(view);
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		return view;
	}

	private void findViews(View view) {
		tvDetailsTitle = (TextView) view.findViewById(R.id.tv_details_title);
		tvDetailsPublishTime = (TextView) view.findViewById(R.id.iv_event_time);
		tvDetailsAuthor = (TextView) view.findViewById(R.id.tv_details_author);
	}

	public void setNewsTitle(String author, String publishTime, String title) {

		tvDetailsAuthor.setText(author);
		tvDetailsPublishTime.setText(publishTime);
		tvDetailsTitle.setText(title);
	}

	@Override
	public void initView(View view) {

	}
}
